package com.admin.controller;

import com.common.domain.entity.ResponseResult;
import com.common.service.ProblemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("system/problem")
public class ProblemController {
    @Autowired
    private ProblemService problemService;

    @GetMapping("list")
    public ResponseResult allProblemList(Integer pageNum, Integer pageSize, String userName, String type){
        return problemService.allProblemList(pageNum,pageSize,userName,type, null);
    }


    @DeleteMapping("{ids}")
    public ResponseResult deleteProblem(@PathVariable String ids){
        return problemService.deleteProblem(ids);
    }

    @GetMapping("changeStatus")
    public ResponseResult changeStatus(Long id, String status){
        return problemService.changeStatus(id, status);
    }
}
